﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Marmat.Foundation;

namespace Marmat.Template.WinForm
{
    /// <summary>
    /// 单据的编辑控制器
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    /// <typeparam name="DataSource"></typeparam>
    public interface IDocumentEditFormController<Entity, DataSource> : Marmat.Foundation.IEditFormRoute, Marmat.Foundation.IEditFormController, IProvider
    {
        /// <summary>
        /// 单据管理实例。
        /// </summary>
        DocumentManagement<Entity, DataSource> Management { get; set; }

        /// <summary>
        /// 获取或设置单据的用户面板。
        /// </summary>
        IDocumentEditForm<Entity, DataSource> FormPanel { get; set; }
    }

    /// <summary>
    /// 单据的编辑控制器
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    public interface IDocumentEditFormController<Entity> : IDocumentEditFormController<Entity, Entity[]> where Entity : new()
    {
    }

    /// <summary>
    /// 单据的编辑控制器
    /// </summary>
    public interface IDocumentEditFormController : IDocumentEditFormController<System.Data.DataRow, System.Data.DataTable>
    {
    }
}
